<?php

/**
 * +------ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER * ---------+
 * +----------------------------------------------------------------------------+
 * | PHPKiisf - Keep It in Simple Framework					|
 * | Version 1.0								|
 * | Copyright (C) <2013>  Mario Cezzare <mcezzare@gmail.com>			|
 * | Blog: http://mcezzare.blogspot.com.br					|
 * |										|
 * | This program is part of PHPKiisf, and is free software: you can		|
 * | redistribute it and/or modify it under the terms of the GNU 		|
 * | General Public License as published by					|
 * | the Free Software Foundation, either version 3 of the License, or		|
 * | (at your option) any later version.					|					|
 * |										|									|
 * | This program is distributed in the hope that it will be useful,		|
 * | but WITHOUT ANY WARRANTY; without even the implied warranty of		|
 * | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the		|
 * | GNU General Public License for more details.				|
 * | You should have received a copy of the GNU General Public License		|
 * | along with this program.  If not, see <http://www.gnu.org/licenses/>.	|
 * +----------------------------------------------------------------------------+
 * | Author : <Mario Cezzare Angelicola Chiodi> <mcezzare@gmail.com>		|
 * +----------------------------------------------------------------------------+
 * | Contributors								|
 * |										|
 * +----------------------------------------------------------------------------+
 *
 */

/**
 * Call the famous index.php
 *
 * @package	Templates
 * @access	public
 * @since	2013-03-08
 * @author	Mario Cezzare <mcezzare@gmail.com>
 */
class index_template extends base_template {

	public static $name_file = "index" ;
	public static $section_name = "Home" ;

	public function __construct() {
		parent::init() ;
		self::init() ;
	}

	public static function init() {
		parent::init() ;
		parent::$section_name = self::$section_name ;
		parent::$name_file = self::$name_file ;
		self::_load() ;
	}

	/**
	 * [load description]
	 *
	 * @return [type]      [description]
	 */
	public static function _load() {
		self::$public_dir = sprintf( "%sskins/%s" , TEMPLATES_DIR , self::$skin ) ;
		$template_index = sprintf( "skins/%s/%s%s" , self::$skin , self::$name_file , INCLUDE_EXTENSION ) ;
		if ( utils::check_template( TEMPLATES_DIR . $template_index ) ) {

			require $template_index ;
			return ;
		}
	}

}

//load the page
if ( spl_autoload_register( 'index_template::init' ) ) {
	index_template::init() ;
}
?>